package tech.wowo.service;

import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.wowo.mapper.UserMapper;
import tech.wowo.pojo.User;

import java.util.List;

/**
 * @Author: ShanYuqing
 * @Version: v1.0
 */
@Service
@Log4j
public class UserServiceImpl implements UserService {
@Autowired
private UserMapper userMapper;

    @Override
    public User login(String username, String password) {
        log.info("----UserServiceImpl---login method--");
        return userMapper.login(username,password);
    }

    @Override
    public List<User> getUserListByName(User user) {
        return userMapper.getUserList(user);
    }

    @Override
    public Integer addUser(User user) {
        return userMapper.addUser(user);
    }
}
